﻿import QtQuick 2.12
import QtQuick.Controls 2.12
import "../components"

// 蓝色按钮的执行弹窗
CustomPopupBox {

    id: root

    title: "提示"
    height: 270*dp; width: 400*dp

    contentItem: Item{               // 完成
        Image {
            id: name
            anchors.centerIn: parent
            anchors.verticalCenterOffset: -60*dp
            height: 56*dp
            width: 56*dp
            source: "qrc:/picture/msgWarning.png"
        }

        Text{
            y: 100*dp
            text: "请先复位设备至原点，再进行其它操作"
            font.pixelSize: config.fontsize
            anchors.horizontalCenter: parent.horizontalCenter
        }
        Row{
            spacing: 12*dp
            anchors.horizontalCenter: parent.horizontalCenter
            y: 150*dp
            CustomButton{
                title: "关闭"
                defaultMode2: true
                onClicked: {
                    root.close()
                }
            }
            CustomButton{
                defaultMode1: true
                title: "复位原点"
                onClicked: {
                    root.close()
                    box_resetting.infoState = 0
                    CMaintenance.reset("0", "0", "")
                    CAnimationShifting.reset()
                    CAnimationPractice.reset()
                    CAnimationPurify.reset()
                    box_resetting.show()        // 显示等待复位的弹窗
                }
            }
        }

    }

}
